public class ChatSelectableButton : SelectableButton
{
	public enum ChatMode
	{
		Room = 0,
		Friend = 1
	}

	public ChatMode mode;

	public override void Select(bool select)
	{
		if (select && !selected)
		{
			openTab(select, mode);
		}
		base.Select(select);
	}

	private void openTab(bool select, ChatMode mode)
	{
		if (select)
		{
			ChatWindow.instance.anchorCenter.SetActive(false);
			ChatWindow.instance.anchorFriendCenter.SetActive(false);
		}
		switch (mode)
		{
		case ChatMode.Room:
			ChatWindow.instance.anchorCenter.SetActive(select);
			break;
		case ChatMode.Friend:
			ChatWindow.instance.anchorFriendCenter.SetActive(select);
			break;
		}
	}
}
